<template>
  <el-dropdown
    plain
    type="single-number"
    placement="bottom"
    trigger="click"
    class="ml10"
    @command="$_handleCommand"
  >
    <el-button type="single-number">
      批量设置<i class="el-icon-arrow-down el-icon--right" />
    </el-button>
    <el-dropdown-menu slot="dropdown">
      <el-dropdown-item
        v-for="(item, index) in dropdownItemArr"
        :key="index"
        :command="item.command"
        :disabled="item.disabled"
      >
        {{ item.text }}
      </el-dropdown-item>
    </el-dropdown-menu>
  </el-dropdown>
</template>

<script>
export default {
  name: "listSettingsBtn",
  props: {
    dropdownItemArr: {
      type: Array,
      default: () => []
    }
  },
  methods: {
    $_handleCommand(val) {
      this.$emit("handleCommand", val);
    }
  }
};
</script>
